package com.tencreat.domain.mall.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 购物车新增、修改
 * @author zixin
 */
@Data
public class MallCartEditDTO {

    @ApiModelProperty(value = "购物车ID",required = true)
    @NotNull(message = "购物车ID不能为空")
    private Long cartId;

    @ApiModelProperty(value = "商品ID",required = true)
    @NotNull(message = "商品ID不能为空")
    private Long goodsId;

    @ApiModelProperty(value = "数量",required = true)
    @NotNull(message = "数量不能不能")
    @Min(value = 1, message = "数量必须大于1")
    private Integer number;

    @ApiModelProperty("规格")
    private Long normsId;
}
